﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace database
{
    public partial class Register : Form
    {
        public Register()
        {
            InitializeComponent();
        }

        private void Register_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            System.Windows.Forms.DialogResult dr;
            dr = MessageBox.Show(this, "确认注册？", "确认",
                MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            switch (dr)
            {
                case System.Windows.Forms.DialogResult.OK:
                    //执行sql语句进行添加操作
                    this.Dispose();
                    break;
                case System.Windows.Forms.DialogResult.Cancel:
                    //返回
                    break;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }
    }
}
